import 'package:dk_flutter_base/dk_ui.dart';
import 'widget_button.dart';

class BottomButtonWidget extends StatelessWidget {
  final Function onCancel;
  final Function onCommit;

  BottomButtonWidget({this.onCancel,this.onCommit});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 64,
      padding: EdgeInsets.only(left: 16, right: 16, top: 10, bottom: 10),
      decoration: new BoxDecoration(
        color: Colors.white,
        boxShadow: [
          BoxShadow(
              color: Color.fromRGBO(0, 0, 0, 0.2),
              offset: Offset(0, -1),
              blurRadius: 1,
              spreadRadius: 0.0)
        ],
      ),
      child: Row(
        children: <Widget>[
          Expanded(
            child: Padding(
              padding: EdgeInsets.only(right: 6),
              child: ButtonWidget(
                backGroundColor: Colors.white,
                titleColor: Color(0xff3DBCC6),
                title: '取消',
                onTap: onCancel,
              ),
            ),
          ),
          Expanded(
            child: Padding(
              padding: EdgeInsets.only(left: 6),
              child: ButtonWidget(title: '提交', onTap: onCommit),
            ),
          ),
        ],
      ),
    );
  }
}
